package cc.mrbird.febs.customer.service.impl;

import cc.mrbird.febs.common.entity.QueryRequest;
import cc.mrbird.febs.customer.entity.Order;
import cc.mrbird.febs.customer.mapper.OrderMapper;
import cc.mrbird.febs.customer.service.IOrderService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 订单表 服务实现类
 * </p>
 *
 * @author Macw
 * @since 2020-11-04
 */
@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements IOrderService {

    @Override
    public IPage<Order> selectOrderByCondition(Order order, QueryRequest request) {
        Page<Order> page = new Page<>(request.getPageNum(), request.getPageSize());
        return  this.baseMapper.selectOrderByCondition(page,order);
    }
}
